import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'

@Component({
  selector: 'app-new-page-header',
  templateUrl: './new-page-header.component.html',
  styleUrls: ['./new-page-header.component.less'],
})
export class NewPageHeaderComponent implements OnInit {

  @Input()
  title: string

  @Input()
  index: number

  @Output()
  minusClick = new EventEmitter()

  @Output()
  addClick = new EventEmitter()

  constructor() {}

  ngOnInit() {
  }

  minus() {
    this.minusClick.emit(this.index)
  }

  add() {
    this.addClick.emit(this.index)
  }
}
